//
//  ViewController.swift
//  DemoApp1
//
//  Created by YangJun on 16/7/20.
//  Copyright © 2016年 YangJun. All rights reserved.
//

import UIKit

class ViewController: UIViewController {
    
    var currentImageNum = 1
    
    @IBOutlet weak var imageView: UIImageView!
    @IBOutlet weak var pictureName: UILabel!

    @IBAction func nextImage(sender: AnyObject) {
        currentImageNum += 1
        let picName = "Pic\(currentImageNum)"
        imageView.image = UIImage(named: picName)
        pictureName.text = picName
    }
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }


}

